const { fetch } = require('./fetch')
const area = 100101
// 授权接口
export const login = params => fetch(`wx/member/${area}/login`, 'GET', params)
// 轮播接口
export const ad = params => fetch(`wx/ad/${area}/list`, 'POST', params)
// 统计信息
export const statistics = params =>
    fetch(`wx/area/${area}/info`, 'POST', params)
// 热门信息
export const hotlist = params =>
    fetch(`wx/message/${area}/hotlist`, 'POST', params)
// 商户分类
export const merchantsType = params => fetch(`wx/store/${area}/type`, 'POST')
// 信息分类
export const messageType = params => fetch(`wx/message/${area}/type`, 'POST')
// 便民信息列表
export const storeList = params =>
    fetch(`wx/store/${area}/list`, 'POST', params)
export const messageList = params =>
    fetch(`wx/message/${area}/list`, 'POST', params)
// 便民信息分类
export const addtype = params => fetch(`wx/message/${area}/addtype`, 'POST')
// 热门商户
export const hotMerchants = params => fetch(`wx/store/${area}/hotlist`, 'POST')
// 区域接口
export const areainfo = params => fetch(`wx/areainfo/${area}/list`, 'POST')
// 推荐部落
export const recotribelist = params =>
    fetch(`wx/tribe/${area}/recotribelist`, 'POST')
// 部落类型
export const tribetypelist = params =>
    fetch(`wx/tribe/${area}/tribetypelist`, 'POST')
// 我的部落
export const tribelist = params => fetch(`wx/tribe/${area}/tribelist`, 'POST')
//话题列表
export const tribetopiclist = params =>
    fetch(`wx/tribe/${area}/tribetopiclist`, 'POST')
// 关于我们
export const aboutMy = `wx/info/${area}/about?id=1`
export const helpMy = `wx/info/${area}/list`
export const xieyi = `wx/info/${area}/xieyi?id=4`
// 商户基本信息
export const storeset = params => fetch(`wx/store/${area}/storeset`, 'POST')
// 商户置顶基本信息
export const storetop = params => fetch(`wx/store/${area}/storetop`, 'POST')
//#endregion
// 商业详情
// https://www.xzwbfw.com/wx/store/100101/detail?id=1

export const business = params =>
    fetch(`wx/store/${area}/detail`, 'POST', params)
// 支付接口
export const pay = params => fetch(`wx/pay/${area}/pay`, 'POST', params)
// 商业详情收藏
// http://wx.zhijianhaibao.com/wx/store/{area}/collectlist
export const businesscollect = params =>
    fetch(`wx/pay/${area}/collectlist`, 'POST', params)

// userinfo
export const memberInfo = params =>
    fetch(`wx/member/${area}/info`, 'POST', params)
// 绑定手机号
export const memberPhone = params =>
    fetch(`wx/member/${area}/phone`, 'POST', params)
// 话题详情
export const gettribeByid = params =>
    fetch(`wx/tribe/${area}/gettribeByid`, 'POST', params)
// 评论列表
export const replyList = params =>
    fetch(`wx/reply/${area}/list`, 'POST', params)
// 商户入驻
export const storeApply = params =>
    fetch(`wx/store/${area}/apply`, 'POST', params)
// 上传图片
export const uploadImg = `wx/upload/image`
